<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',							'rb');
define('FOPEN_READ_WRITE',						'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',					'ab');
define('FOPEN_READ_WRITE_CREATE',				'a+b');
define('FOPEN_WRITE_CREATE_STRICT',				'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');



//是否向应用商店添加测试用户
define('ADD_TUSER_FLAG','0');

if (defined('ENVIRONMENT'))
{
	switch (ENVIRONMENT)
	{
		case 'testing':
		    /** base url */
		    define('BASE_URL', 'http://marketing.v5.com');
		    /** log path */
		    define('LOG_PATH', 'application/logs/');
		    /** cache path */
		    define('CACHE_PATH', 'application/cache/');
		    //资源中心地址
		    define('RESOURCE_PATH', 'http://file.tt9.com');
            /** url解析服务器ip */
			define('TT_SERVICE_LINK_URL', 'http://10.10.50.13:10690/');
		    define('TTV5_CGI_PATH', 'http://ttcgi.v5.com/');
            /** 访问TT域名 */
			define('TT_DOMAIN_URL',  'http://www.v5.com/');
		    // 应用添加测试账号地址
		    define('TTV5_APP_PATH', 'http://store.v5.com/');

			//当前应用的ID
		    define('MARKETING_APPID', 'ZPRJQ5');

			/** 应用数据库配置 */
			define('TT_MARKETING_DB_HOST','192.168.53.81');
			define('TT_MARKETING_DB_NAME','tt_marketing');
			define('TT_MARKETING_DB_USER','tt_marketing');
			define('TT_MARKETING_DB_PWD','tt_marketing');
		break;
		case 'production':
		    /** base url */
		    define('BASE_URL', 'http://marketing.titii.com');
		    /** log path */
		    define('LOG_PATH', 'application/logs/');
		    /** cache path */
		    define('CACHE_PATH', 'application/cache/');
		    //资源中心地址
		    define('RESOURCE_PATH', 'http://file.tt139.com');
			/** url解析服务器ip */
			define('TT_SERVICE_LINK_URL', 'http://192.168.51.115:10690/');
		    define('TTV5_CGI_PATH', 'http://v5ttcgi.titii.com/');
            /** 访问TT域名 */
			define('TT_DOMAIN_URL',  'http://www.titii.com/');
		    // 应用添加测试账号地址
		    define('TTV5_APP_PATH', 'http://store.titii.com/');

			//当前应用的ID
		    define('MARKETING_APPID', 'Ogf271');

			/** 应用数据库配置 */
			define('TT_MARKETING_DB_HOST','192.168.53.83');
			define('TT_MARKETING_DB_NAME','tt_marketing');
			define('TT_MARKETING_DB_USER','tt_marketing');
			define('TT_MARKETING_DB_PWD','tt_marketing');
		break;
		case 'development':
		default:
		    /** base url */
		    define('BASE_URL', 'http://ttmarketing.ttkaifa.com');
		   	//define('BASE_URL', 'http://marketing.ttkaifa.com');
		    /** log path */
		    define('LOG_PATH', 'application/logs/');
		    /** cache path */
		    define('CACHE_PATH', 'application/cache/');
		    //资源中心地址
		    define('RESOURCE_PATH', 'http://file.ttkaifa.com:8080');
			/** url解析服务器ip */
			define('TT_SERVICE_LINK_URL', 'http://10.10.50.13:10690/');
		    define('TTV5_CGI_PATH', 'http://ttcgi.ttkaifa.com/');
            /** 访问TT域名 */
			define('TT_DOMAIN_URL',  'http://www.ttv5.com/');
			// 应用添加测试账号地址
		    define('TTV5_APP_PATH', 'http://store.ttkaifa.com/');

		    //当前应用的ID
		    define('MARKETING_APPID', 'cUmLon');

			/** 应用数据库配置 */
			define('TT_MARKETING_DB_HOST','192.168.51.31');
			define('TT_MARKETING_DB_NAME','medium');
			define('TT_MARKETING_DB_USER','tt2');
			define('TT_MARKETING_DB_PWD','123456');

	}
}
define('SOURSE_URL',  'http://file.tt139.com/');
/**
 * WEB服务协议
 */
define('REQUEST_HTTP', 'http://');

/**
 * 资源中心请求头
 */
define('REQUEST_HTTP_RC', 'http://');



//上传临时路径
define("TT_PHOTO_PATH","img/");

/**
 * 资源中心图片url
 */
define('UPLOAD_ICON_URL', SOURSE_URL.'rc/uploadicon?sid=');          //用户图像上传
define('GET_ICON_URL', SOURSE_URL.'rc/geticon?rid=');         	     //用户图像显示
define('UPLOAD_IMAGE_URL', SOURSE_URL.'rc/upload?sid=');             //上传图片接口
define('URL_UPLOAD_URL', SOURSE_URL.'urlupload?sid=');				 //url上传接口
define('GET_RESOURCE_URL', SOURSE_URL.'rc/getresourcemeta?rid=');    //获取资源文件详细信息
define('DOWNLOAP_IMAGE_URL', SOURSE_URL.'rc/getresource?rid=');      //下载图片接口
define('SHOW_CUT_IMAGE_URL', SOURSE_URL.'rc/getcuttedpicture?rid='); //剪裁显示图片接口  
define('SHOW_IMAGE_URL', SOURSE_URL.'rc/getpicture?rid=');			 //剪裁图片显示接口
define('SHOW_ORGIMAGE_URL', SOURSE_URL.'rc/getcroppedpicture?rid='); //原图剪裁图片显示接口
define('GET_DOCUMENT_URL', SOURSE_URL.'rc/getdocument?rid=');  	     //文档接口
define('GET_AUDIO_URL', SOURSE_URL.'rc/getaudio?rid=');   			 //获取音频接口
define('GET_VIDEO_URL', SOURSE_URL.'rc/getvideo?rid=');   			 //获取视频接口
define('GET_EXTRACT_URL', SOURSE_URL.'rc/extract?rid=');             //压缩文件包接口
define('TMP_TO_FORMALRES', SOURSE_URL.'rc/converttmptoformalres?rids=');//生成临时文件 isicontype： false 普通图片  true为用户图像
define('GET_MORE_RESOURCE', SOURSE_URL.'rc/getresourcemetas?rids=');//获取更多资源详情，多个rid之间用逗号“,”分隔



/* End of file constants.php */
/* Location: ./application/config/constants.php */